[Unit]
Description=A high performance web server and a reverse proxy server
After=network-online.target

[Service]
User={{ elk_user }}
Group={{ elk_group }}

Type=forking
PIDFile={{ elk_path.logs }}/nginx/nginx.pid
ExecStartPre={{ elk_path.apps }}/nginx/sbin/nginx -t
ExecStart={{ elk_path.apps }}/nginx/sbin/nginx
ExecReload={{ elk_path.apps }}/nginx/sbin/nginx -s reload
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

Restart=always
RestartSec=5
StartLimitIntervalSec=60
StartLimitBurst=3

[Install]
WantedBy=multi-user.target
